//
//  MyContactsCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/8/30.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit
import LJContactManager

class MyContactsCell: BaseTableViewCell {
    
    @IBOutlet weak var leftImageView: UIImageView!
    
    
    
    @IBOutlet weak var nameLabel: UILabel!
    
    @IBOutlet weak var phoneLabel: UILabel!
    
    var model : LJPerson?{
    
        didSet{
        
            if model == nil {
                return
            }
            
            nameLabel.text = model?.fullName
            
            phoneLabel.text = model?.phones[0].phone
            
            if model?.image != nil {
                leftImageView.image = model?.image
            }
        
        
        }
    
    }
    
    

    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        
        leftImageView.addCornerAndBorder(borderColor: nil, borderWidth: 0, masksToBounds: true, cornerRadius: 28)
        
        leftImageView.image = UIImage.defaulIconImage()
        
//        phoneLabel.textColor = UIColor.dakGray()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
